home *** CD-ROM | disk | FTP | other *** search
- unit TTTServer_TLB;
-
- // ************************************************************************ //
- // WARNING //
- // ------- //
- // The types declared in this file were generated from data read from a //
- // Type Library. If this type library is explicitly or indirectly (via //
- // another type library referring to this type library) re-imported, or the //
- // 'Refresh' command of the Type Library Editor activated while editing the //
- // Type Library, the contents of this file will be regenerated and all //
- // manual modifications will be lost. //
- // ************************************************************************ //
-
- // PASTLWTR : $Revision: 1.11.1.75 $
- // File generated on 4/28/99 1:28:47 AM from Type Library described below.
-
- // ************************************************************************ //
- // Type Lib: C:\My Documents\DelphiMag, June99\TTT\TTTServer.tlb
- // IID\LCID: {BA02A6A0-FD07-11D2-AF31-0000861EF0BB}\0
- // Helpfile:
- // HelpString: Project1 Library
- // Version: 1.0
- // ************************************************************************ //
-
- interface
-
- uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
-
- // *********************************************************************//
- // GUIDS declared in the TypeLibrary. Following prefixes are used: //
- // Type Libraries : LIBID_xxxx //
- // CoClasses : CLASS_xxxx //
- // DISPInterfaces : DIID_xxxx //
- // Non-DISP interfaces: IID_xxxx //
- // *********************************************************************//
- const
- LIBID_TTTServer: TGUID = '{BA02A6A0-FD07-11D2-AF31-0000861EF0BB}';
- IID_IGameServer: TGUID = '{BA02A6A1-FD07-11D2-AF31-0000861EF0BB}';
- CLASS_GameServer: TGUID = '{BA02A6A3-FD07-11D2-AF31-0000861EF0BB}';
-
- // *********************************************************************//
- // Declaration of Enumerations defined in Type Library //
- // *********************************************************************//
- // SkillLevels constants
- type
- SkillLevels = TOleEnum;
- const
- slUnconcious = $00000000;
- slAwake = $00000001;
-
- // GameResults constants
- type
- GameResults = TOleEnum;
- const
- grInProgress = $00000000;
- grTie = $00000001;
- grPlayerWin = $00000002;
- grComputerWin = $00000003;
-
- type
-
- // *********************************************************************//
- // Forward declaration of interfaces defined in Type Library //
- // *********************************************************************//
- IGameServer = interface;
- IGameServerDisp = dispinterface;
-
- // *********************************************************************//
- // Declaration of CoClasses defined in Type Library //
- // (NOTE: Here we map each CoClass to its Default Interface) //
- // *********************************************************************//
- GameServer = IGameServer;
-
-
- // *********************************************************************//
- // Interface: IGameServer
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {BA02A6A1-FD07-11D2-AF31-0000861EF0BB}
- // *********************************************************************//
- IGameServer = interface(IDispatch)
- ['{BA02A6A1-FD07-11D2-AF31-0000861EF0BB}']
- procedure NewGame(out GameID: Integer); safecall;
- procedure PlayerMove(GameID: Integer; X: Integer; Y: Integer; out GameRez: GameResults); safecall;
- procedure ComputerMove(GameID: Integer; SkillLevel: SkillLevels; out X: Integer;
- out Y: Integer; out GameRez: GameResults); safecall;
- end;
-
- // *********************************************************************//
- // DispIntf: IGameServerDisp
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {BA02A6A1-FD07-11D2-AF31-0000861EF0BB}
- // *********************************************************************//
- IGameServerDisp = dispinterface
- ['{BA02A6A1-FD07-11D2-AF31-0000861EF0BB}']
- procedure NewGame(out GameID: Integer); dispid 1;
- procedure PlayerMove(GameID: Integer; X: Integer; Y: Integer; out GameRez: GameResults); dispid 2;
- procedure ComputerMove(GameID: Integer; SkillLevel: SkillLevels; out X: Integer;
- out Y: Integer; out GameRez: GameResults); dispid 3;
- end;
-
- CoGameServer = class
- class function Create: IGameServer;
- class function CreateRemote(const MachineName: string): IGameServer;
- end;
-
- implementation
-
- uses ComObj;
-
- class function CoGameServer.Create: IGameServer;
- begin
- Result := CreateComObject(CLASS_GameServer) as IGameServer;
- end;
-
- class function CoGameServer.CreateRemote(const MachineName: string): IGameServer;
- begin
- Result := CreateRemoteComObject(MachineName, CLASS_GameServer) as IGameServer;
- end;
-
- end.
-